package fr.uniscol.siecle.model;

import java.io.Serializable;

public class TypeEtablissement implements Serializable, DonneeSiecle {

	private String code = null;
	
	private String libelleCourt = null;
	
	private String libelleLong = null;

	public TypeEtablissement() {
		super();
	}

	public TypeEtablissement(String code, String libelleCourt, String libelleLong) {
		super();
		this.code = code;
		this.libelleCourt = libelleCourt;
		this.libelleLong = libelleLong;
	}

	public String getCode() {
		if(code == null){
			code = "";
		}
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getLibelleCourt() {
		if(libelleCourt == null){
			libelleCourt = "";
		}
		return libelleCourt;
	}

	public void setLibelleCourt(String libelleCourt) {
		this.libelleCourt = libelleCourt;
	}

	public String getLibelleLong() {
		if(libelleLong == null){
			libelleLong = "";
		}
		return libelleLong;
	}

	public void setLibelleLong(String libelleLong) {
		this.libelleLong = libelleLong;
	}

	@Override
	public boolean equals(Object obj) {
		TypeEtablissement te = (TypeEtablissement)obj;
		return getCode().equalsIgnoreCase(te.getCode());
	}
}
